/*
 * @Description: 
 * @Author: sunqiaoxi
 * @Date: 2020-12-25 15:30:33
 */


// layout
import Fotter from "@/layout/fotter/index.vue";
import Header from "@/layout/header/index.vue";

//#region 自动导入模块路由
const files = require.context("./modules", false, /\.js$/);
const modules = [];

files.keys().forEach((key) => {
  modules.push(files(key).default || files(key));
});
//#endregion

const routes = [
  // {
  //   path: "/home",
  //   name: "fotterMain",
  //   meta: {
  //     title: "吉祥医生",
  //     isOpen: true,
  //   },
  //   component: () => import("@/views/home/index.vue"),
  // },
  {
    path: "/",
    name: "fotterMain",
    redirect: "/home",
    component: Fotter,
    children: [
      {
        path: "home",
        name: "home",
        meta: {
          title: "我要开票",
        },
        component: () => import("@/views/home/index.vue"),
      },
      // {
      //   path: "mapDemo",
      //   name: "mapDemo",
      //   meta: {
      //     title: "地图",
      //     isOpen: true,
      //   },
      //   component: () => import("@/views/mapDemo/index.vue"),
      // },
     
    ],
  },
  {
    path: "/",
    name: "headerMain",
    redirect: "/home",
    component: Header,
    children: [...modules],
  },
  
  
];

export default routes;
